<?php $this->Html->css('form', 'stylesheet', array('inline' => false));?>
<?php $this->Javascript->link('tiny_mce/tiny_mce.js', false);?>
<?php $this->Javascript->link('tiny_mce_editor.js', false);?>
<div class="grid_8 form">
  <div class="single-page">
    <h2>Informasi Usaha Anda</h2>
    <div id="message">
    <?php
        if ($session->check('Message.flash')):
          echo $session->flash();
        endif;
    ?>
    </div>
    <?php
      $ijform->setIj($infojabotabek);
      echo $ijform->renderForm('Place', $fields, array(
        'enctype' => 'multipart/form-data',
      ));
    /*
    echo $this->Form->create('Place', array(
      'enctype' => 'multipart/form-data'
    ));
      echo $this->Form->input('name', array(
        'label' => 'Nama Usaha', 'class' => 'long'
      ));

      echo '<div class="input">';
      echo '<label>Kota</label>';
      echo $this->Form->select('city', $infojabotabek['cities']);
      echo ($form->isFieldError('city')) ? $form->error('city') : '';
      echo '</div>';

      echo $this->Form->input('description_short', array(
        'label' => 'Deskripsi Singkat', 'type' => 'textarea'));

      echo $this->Form->input('description', array(
          'label' => 'Deskripsi Detil'));

      echo $form->input('logo_filename', array(
        'label' => 'Upload Logo', 'type' => 'file'
      ));
      ?>

      <div id="upload_image" class="input">
        <label>Upload Photo (Untuk Galeri)</label>
        <?php
          echo $form->input('imagename', array(
            'class' => 'imagename', 'id' => false, 'label' => false,
            'div' => false,
            'name' => 'data[Place][PlaceImage][imagename][]', 'type' => 'file'
          ));
        ?>
      </div>
      <a href="#" id="add_upload_image">Tambah gambar</a>

      <div id="upload_video" class="input">
        <label>Upload Video (Untuk Galeri)</label>
        <?php
          echo $form->input('youtube_id', array(
            'class'=>'youtube_id', 'id' => false, 'label' => false,
            'div' => false, 'type' => 'text',
            'name' => 'data[Place][PlaceVideo][youtube_id][]'
          ));
        ?>
      </div>
      <a href="#" id="add_upload_video">Tambah video</a>
      <?php
        echo $this->Form->input('phone', array(
            'label' => 'Telp.'));

        echo $this->Form->input('fax', array(
            'label' => 'Fax'));

        echo $this->Form->input('website', array(
            'label' => 'Website'));

        echo $this->Form->input('email', array(
            'label' => 'Email'));
      ?>
      <div style="width: 460px;" class="input">
        <label>Peta Loksi</label>
        <div id="map-container" class="small-map"></div>
        <span class="help-text">Klik pada peta untuk menandai lokasi<br />
        atau geser penanda jika ada
        </span>
        <?php
          echo $form->input('lat', array('type' => 'hidden'));
          echo $form->input('lng', array('type' => 'hidden'));
        ?>
      </div>
    <?php
    echo $this->Form->submit('Simpan');
    echo $this->Form->end();*/
    ?>
  </div>
</div>
<div class="grid_4">
  <div class="single-page">
    <?php echo $this->element('form.guidance');?>
  </div>
</div>
<div class="clear"></div>
<script type="text/javascript">
$(function() {
    $('.youtube_id').click(onEmptyVideo('click', this))
                   .blur(onEmptyVideo('blur', this)).trigger('click');

    function onEmptyVideo(ev, el) {
      var defaultVal = 'Youtube ID';
      if (!el.value && ev == 'blur') {
        el.value = defaultVal;
      } else if (el.value == defaultVal && ev == 'click') {
        el.value = '';
      }
    }
});
</script>
